1. Field of the Invention
The present invention relates to a device and a method for adjusting, by a desired magnification, the number of pixels of image data which is displayed or printed using a data processing device.
2. Description of the Prior Art
In personal computers, printers and various other data processing devices, when transferring image data between applications having different image data resolutions, an image data adjusting process is carried out for a resolution adjustment by increasing or decreasing the number of pixels of the image data. Further, when storing image data having a large number of pixels into a memory, a process is performed to decrease the number of pixels of the image data for reducing a storage capacity of the memory. The number of the pixels of the image data may also be reduced upon transmitting the image data via a communication line for reducing a transmission time.
When, for example, increasing the number of pixels of image data by integer times (integral magnifications) in width and height directions (X- and Y-directions), respectively, each pixel is copied as many times as represented by the magnifications in the X- and Y-directions. Accordingly, for example, each pixel is copied N times in the X-direction and M times in the Y-direction so that image data having N.times.M times pixels can be obtained.
On the other hand, when increasing the number of pixels of image data by a magnification of a real number not an integer, such as 1.5 times or 2.5 times, in either direction, the pixels to be copied and the pixels not to be copied are mixed to achieve such a magnification.
For increasing the number of pixels, it is the simplest to add a pixel of the same pixel value at a subsequent position. However, in case of an image expressing the halftone, unnatural shade is generated to deteriorate the quality of the image when displayed or printed. This is particularly significant when adjusting the number of pixels of image data by a non-integral magnification.
Accordingly, for achieving smooth change in pixel values of pixels in an output image which are increased by copying, a proper calculation is carried out by referring to a plurality of peripheral pixels. This is called a resampling process, wherein the method of first degree interpolation or the like is used for calculating pixel values of the respective pixels.
However, the foregoing conventional technique has the following problem:
For calculating pixel values of output pixels in an output image using the method of first degree interpolation or the like, it is necessary to provide in advance pixel values of input pixels disposed around each of the output pixels whose pixel values are to be derived. Accordingly, it is necessary that, for example, substantially one-page image data or the like be stored in advance in a buffer memory and then read out in turn to be subjected to a given process.
Thus, the conventional technique can not achieve the effective use of the memory and prolongs an image data processing time.